<?php
session_start();
if(isset($_POST['uname']) && isset($_POST['pass'])){
$uname = $_POST['uname'];
$pass = $_POST['pass'];
if($uname == 'hambaahambaa' && $pass == 'fedcba654321'){
$_SESSION['inSession'] = "Y";
header( 'Location:index.php' ) ;
}
}
?>

<html>
<body>
<form method="POST" action="uname.php">
User Name: <input type="text" name="uname" id="uname"/><br/>
Password : <input type="password" name="pass" id="pass"/><br/>
<input type="submit" value="Submit" />
</form>
</body>
</html>